/* Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "zobjects_gtk.h"

int CreateNotebookLayout( struct ZlangRuntime *rt , struct ZlangDirectProperty_guinotebooklayout *guinotebooklayout_direct_prop )
{
	struct ZlangDirectProperty_guiwidget_common	*guinotebooklayout_common = (struct ZlangDirectProperty_guiwidget_common *)guinotebooklayout_direct_prop ;

	guinotebooklayout_common->gtk_widget = gtk_notebook_new() ;

	return 0;
}

ZlangInvokeFunction ZlangInvokeFunction_guinotebooklayout_Create_guiwindow;
int ZlangInvokeFunction_guinotebooklayout_Create_guiwindow( struct ZlangRuntime *rt , struct ZlangObject *obj )
{
	struct ZlangObject				*in1 = GetInputParameterInLocalObjectStack(rt,1) ;
	struct ZlangObject				*out1 = GetOutputParameterInLocalObjectStack(rt,1) ;
	struct ZlangDirectProperty_guinotebooklayout	*guinotebooklayout_direct_prop = GetObjectDirectProperty(out1) ;
	struct ZlangDirectProperty_guiwidget_common	*guinotebooklayout_common = (struct ZlangDirectProperty_guiwidget_common *)guinotebooklayout_direct_prop ;
	int						nret = 0 ;

	nret = CreateNotebookLayout( rt , guinotebooklayout_direct_prop ) ;
	if( nret )
	{
		UnreferObject( rt , out1 );
		return 0;
	}

	TRANSFER_INPUT_OBJECT_TO_NEW_OBJECT( guinotebooklayout_common->guiwindow_obj , in1 )

	return 0;
}

ZlangInvokeFunction ZlangInvokeFunction_guinotebooklayout_AppendPage_object_string;
int ZlangInvokeFunction_guinotebooklayout_AppendPage_object_string( struct ZlangRuntime *rt , struct ZlangObject *obj )
{
	struct ZlangDirectProperty_guinotebooklayout	*guinotebooklayout_direct_prop = GetObjectDirectProperty(obj) ;
	struct ZlangDirectProperty_guiwidget_common	*guinotebooklayout_common = (struct ZlangDirectProperty_guiwidget_common *)guinotebooklayout_direct_prop ;
	struct ZlangObject				*in1 = GetInputParameterInLocalObjectStack(rt,1) ;
	struct ZlangObject				*in2 = GetInputParameterInLocalObjectStack(rt,2) ;
	struct ZlangObject				*out1 = GetOutputParameterInLocalObjectStack(rt,1) ;
	struct ZlangDirectProperty_guilayout		*guictl_direct_prop = GetObjectDirectProperty(in1) ;
	struct ZlangDirectProperty_guiwidget_common	*guictl_common = (struct ZlangDirectProperty_guiwidget_common *)guictl_direct_prop ;
	char						*tab_label_text = NULL ;
	int						page_no ;

	CallRuntimeFunction_string_GetStringValue( rt , in2 , & tab_label_text , NULL );

	page_no = gtk_notebook_append_page( GTK_NOTEBOOK(guinotebooklayout_common->gtk_widget) , GetControlParentGtkWidget(guictl_common) , gtk_label_new(tab_label_text) ) ;
	gtk_notebook_set_current_page( GTK_NOTEBOOK(guinotebooklayout_common->gtk_widget) , page_no );

	guictl_common->guiwindow_obj = guinotebooklayout_common->guiwindow_obj ;

	TRANSFER_MASTER_OBJECT_TO_OUTPUT_OBJECT

	return 0;
}

ZlangInvokeFunction ZlangInvokeFunction_guinotebooklayout_SetCurrentPageByNo_int;
int ZlangInvokeFunction_guinotebooklayout_SetCurrentPageByNo_int( struct ZlangRuntime *rt , struct ZlangObject *obj )
{
	struct ZlangDirectProperty_guinotebooklayout	*guinotebooklayout_direct_prop = GetObjectDirectProperty(obj) ;
	struct ZlangDirectProperty_guiwidget_common	*guinotebooklayout_common = (struct ZlangDirectProperty_guiwidget_common *)guinotebooklayout_direct_prop ;
	struct ZlangObject				*in1 = GetInputParameterInLocalObjectStack(rt,1) ;
	struct ZlangObject				*out1 = GetOutputParameterInLocalObjectStack(rt,1) ;
	int						page_no ;

	CallRuntimeFunction_int_GetIntValue( rt , in1 , & page_no );

	gtk_notebook_set_current_page( GTK_NOTEBOOK(guinotebooklayout_common->gtk_widget) , page_no-1 );

	TRANSFER_MASTER_OBJECT_TO_OUTPUT_OBJECT

	return 0;
}

ZlangInvokeFunction ZlangInvokeFunction_guinotebooklayout_SetCurrentPageLabel_string;
int ZlangInvokeFunction_guinotebooklayout_SetCurrentPageLabel_string( struct ZlangRuntime *rt , struct ZlangObject *obj )
{
	struct ZlangDirectProperty_guinotebooklayout	*guinotebooklayout_direct_prop = GetObjectDirectProperty(obj) ;
	struct ZlangDirectProperty_guiwidget_common	*guinotebooklayout_common = (struct ZlangDirectProperty_guiwidget_common *)guinotebooklayout_direct_prop ;
	struct ZlangObject				*in1 = GetInputParameterInLocalObjectStack(rt,1) ;
	struct ZlangObject				*out1 = GetOutputParameterInLocalObjectStack(rt,1) ;
	char						*tab_label_text = NULL ;
	GtkWidget					*current_page = NULL ;
	GtkWidget					*label = NULL ;

	CallRuntimeFunction_string_GetStringValue( rt , in1 , & tab_label_text , NULL );

	current_page = gtk_notebook_get_nth_page( GTK_NOTEBOOK(guinotebooklayout_common->gtk_widget) , gtk_notebook_get_current_page(GTK_NOTEBOOK(guinotebooklayout_common->gtk_widget)) );
	label = gtk_notebook_get_tab_label( GTK_NOTEBOOK(guinotebooklayout_common->gtk_widget) , current_page ) ;
	gtk_label_set_text( GTK_LABEL(label) , tab_label_text );

	TRANSFER_MASTER_OBJECT_TO_OUTPUT_OBJECT

	return 0;
}

ZLANG_INVOKE_FUNCTION_guiwidget_all_common_functions( notebooklayout )

ZLANG_INVOKE_FUNCTION_guilayout_all_common_functions( notebooklayout )

ZlangInvokeFunction ZlangInvokeFunction_guinotebooklayout_GetCurrentPageNo;
int ZlangInvokeFunction_guinotebooklayout_GetCurrentPageNo( struct ZlangRuntime *rt , struct ZlangObject *obj )
{
	struct ZlangDirectProperty_guinotebooklayout	*guinotebooklayout_direct_prop = GetObjectDirectProperty(obj) ;
	struct ZlangDirectProperty_guiwidget_common	*guinotebooklayout_common = (struct ZlangDirectProperty_guiwidget_common *)guinotebooklayout_direct_prop ;
	struct ZlangObject				*out1 = GetOutputParameterInLocalObjectStack(rt,1) ;
	int						page_no ;

	page_no = gtk_notebook_get_current_page(GTK_NOTEBOOK(guinotebooklayout_common->gtk_widget)) ;

	CallRuntimeFunction_int_SetIntValue( rt , out1 , page_no+1 );
	return 0;
}

ZlangInvokeFunction ZlangInvokeFunction_guinotebooklayout_GetPageCount;
int ZlangInvokeFunction_guinotebooklayout_GetPageCount( struct ZlangRuntime *rt , struct ZlangObject *obj )
{
	struct ZlangDirectProperty_guinotebooklayout	*guinotebooklayout_direct_prop = GetObjectDirectProperty(obj) ;
	struct ZlangDirectProperty_guiwidget_common	*guinotebooklayout_common = (struct ZlangDirectProperty_guiwidget_common *)guinotebooklayout_direct_prop ;
	struct ZlangObject				*out1 = GetOutputParameterInLocalObjectStack(rt,1) ;
	int						page_count ;
	
	page_count = gtk_notebook_get_n_pages( GTK_NOTEBOOK(guinotebooklayout_common->gtk_widget) ) ;

	CallRuntimeFunction_int_SetIntValue( rt , out1 , page_count );
	return 0;
}

ZlangInvokeFunction ZlangInvokeFunction_guinotebooklayout_IsCurrentPageType_object;
int ZlangInvokeFunction_guinotebooklayout_IsCurrentPageType_object( struct ZlangRuntime *rt , struct ZlangObject *obj )
{
	struct ZlangDirectProperty_guinotebooklayout	*guinotebooklayout_direct_prop = GetObjectDirectProperty(obj) ;
	struct ZlangDirectProperty_guiwidget_common	*guinotebooklayout_common = (struct ZlangDirectProperty_guiwidget_common *)guinotebooklayout_direct_prop ;
	struct ZlangObject				*in1 = GetInputParameterInLocalObjectStack(rt,1) ;
	struct ZlangObject				*out1 = GetOutputParameterInLocalObjectStack(rt,1) ;
	struct ZlangDirectProperty_guiwidget_common	*in_guictl_common = (struct ZlangDirectProperty_guiwidget_common *)GetObjectDirectProperty(in1) ;
	GtkWidget					*current_page_widget = NULL ;
	GType						current_page_widget_type_id ;

	current_page_widget = gtk_notebook_get_nth_page( GTK_NOTEBOOK(guinotebooklayout_common->gtk_widget) , gtk_notebook_get_current_page(GTK_NOTEBOOK(guinotebooklayout_common->gtk_widget)) );
	if( current_page_widget == NULL )
	{
		CallRuntimeFunction_bool_SetBoolValue( rt , out1 , FALSE );
		return 0;
	}
	current_page_widget_type_id = G_OBJECT_TYPE( current_page_widget ) ;

	if( current_page_widget_type_id == in_guictl_common->gtk_widget_type_id )
		CallRuntimeFunction_bool_SetBoolValue( rt , out1 , TRUE );
	else
		CallRuntimeFunction_bool_SetBoolValue( rt , out1 , FALSE );

	return 0;
}

ZlangInvokeFunction ZlangInvokeFunction_guinotebooklayout_GetCurrentPageWithType_object;
int ZlangInvokeFunction_guinotebooklayout_GetCurrentPageWithType_object( struct ZlangRuntime *rt , struct ZlangObject *obj )
{
	struct ZlangDirectProperty_guinotebooklayout	*guinotebooklayout_direct_prop = GetObjectDirectProperty(obj) ;
	struct ZlangDirectProperty_guiwidget_common	*guinotebooklayout_common = (struct ZlangDirectProperty_guiwidget_common *)guinotebooklayout_direct_prop ;
	struct ZlangObject				*in1 = GetInputParameterInLocalObjectStack(rt,1) ;
	struct ZlangObject				*out1 = GetOutputParameterInLocalObjectStack(rt,1) ;
	void						*type_guictl_obj_direct_prop = GetObjectDirectProperty(in1) ; \
	struct ZlangDirectProperty_guiwidget_common	*type_guictl_common = (struct ZlangDirectProperty_guiwidget_common *)type_guictl_obj_direct_prop ; \
	GtkWidget					*current_page = NULL ;
	struct ZlangObject				*clone_guilayout_obj = NULL ;
	struct ZlangDirectProperty_guilayout		*clone_guilayout_obj_direct_prop = NULL ;
	struct ZlangDirectProperty_guiwidget_common	*clone_guilayout_common = NULL ;
	int						nret = 0 ;

	current_page = gtk_notebook_get_nth_page( GTK_NOTEBOOK(guinotebooklayout_common->gtk_widget) , gtk_notebook_get_current_page(GTK_NOTEBOOK(guinotebooklayout_common->gtk_widget)) );

	if( type_guictl_common->gtk_widget_type_id == 0 || type_guictl_common->gtk_widget_type_id != G_OBJECT_TYPE(current_page) )
	{
		UnreferObject( rt , out1 );
		return ThrowErrorException( rt , ZLANG_ERROR_INVOKE_METHOD_RETURN , EXCEPTION_MESSAGE_GTK_WIDGET_TYPE_NOT_MATCHED );
	}
	
	clone_guilayout_obj = CloneObjectInTmpStack( rt , NULL , in1 ) ;
	if( clone_guilayout_obj == NULL )
	{
		UnreferObject( rt , out1 );
		return ThrowErrorException( rt , ZLANG_ERROR_INVOKE_METHOD_RETURN , EXCEPTION_MESSAGE_CLONE_OBJECT_FAILED );
	}

	clone_guilayout_obj_direct_prop = GetObjectDirectProperty(clone_guilayout_obj) ;
	clone_guilayout_common = (struct ZlangDirectProperty_guiwidget_common *)clone_guilayout_obj_direct_prop ;
	clone_guilayout_common->gtk_widget = current_page ;
	clone_guilayout_common->guiwindow_obj = guinotebooklayout_common->guiwindow_obj ;

	nret = ReferObject( rt , out1 , clone_guilayout_obj ) ;
	if( nret )
	{
		UnreferObject( rt , out1 );
		return ThrowErrorException( rt , ZLANG_ERROR_INVOKE_METHOD_RETURN , EXCEPTION_MESSAGE_REFER_OBJECT_FAILED );
	}

	return 0;
}

ZlangInvokeFunction ZlangInvokeFunction_guinotebooklayout_GetPageByNo_int_object;
int ZlangInvokeFunction_guinotebooklayout_GetPageByNo_int_object( struct ZlangRuntime *rt , struct ZlangObject *obj )
{
	struct ZlangDirectProperty_guinotebooklayout	*guinotebooklayout_direct_prop = GetObjectDirectProperty(obj) ;
	struct ZlangDirectProperty_guiwidget_common	*guinotebooklayout_common = (struct ZlangDirectProperty_guiwidget_common *)guinotebooklayout_direct_prop ;
	struct ZlangObject				*in1 = GetInputParameterInLocalObjectStack(rt,1) ;
	struct ZlangObject				*in2 = GetInputParameterInLocalObjectStack(rt,2) ;
	struct ZlangObject				*out1 = GetOutputParameterInLocalObjectStack(rt,1) ;
	int						page_no ;
	GtkWidget					*page = NULL ;
	struct ZlangObject				*clone_guilayout_obj = NULL ;
	struct ZlangDirectProperty_guilayout		*clone_guilayout_obj_direct_prop = NULL ;
	struct ZlangDirectProperty_guiwidget_common	*clone_guilayout_common = NULL ;
	int						nret = 0 ;

	CallRuntimeFunction_int_GetIntValue( rt , in1 , & page_no );

	page = gtk_notebook_get_nth_page( GTK_NOTEBOOK(guinotebooklayout_common->gtk_widget) , page_no-1 );

	clone_guilayout_obj = CloneObjectInTmpStack( rt , NULL , in2 ) ;
	if( clone_guilayout_obj == NULL )
	{
		UnreferObject( rt , out1 );
		return ThrowErrorException( rt , ZLANG_ERROR_INVOKE_METHOD_RETURN , EXCEPTION_MESSAGE_CLONE_OBJECT_FAILED );
	}

	clone_guilayout_obj_direct_prop = GetObjectDirectProperty(clone_guilayout_obj) ;
	clone_guilayout_common = (struct ZlangDirectProperty_guiwidget_common *)clone_guilayout_obj_direct_prop ;
	clone_guilayout_common->gtk_widget = page ;
	clone_guilayout_common->guiwindow_obj = guinotebooklayout_common->guiwindow_obj ;

	nret = ReferObject( rt , out1 , clone_guilayout_obj ) ;
	if( nret )
	{
		UnreferObject( rt , out1 );
		return ThrowErrorException( rt , ZLANG_ERROR_INVOKE_METHOD_RETURN , EXCEPTION_MESSAGE_REFER_OBJECT_FAILED );
	}

	return 0;
}

ZlangInvokeFunction ZlangInvokeFunction_guinotebooklayout_RemovePage_int;
int ZlangInvokeFunction_guinotebooklayout_RemovePage_int( struct ZlangRuntime *rt , struct ZlangObject *obj )
{
	struct ZlangDirectProperty_guinotebooklayout	*guinotebooklayout_direct_prop = GetObjectDirectProperty(obj) ;
	struct ZlangDirectProperty_guiwidget_common	*guinotebooklayout_common = (struct ZlangDirectProperty_guiwidget_common *)guinotebooklayout_direct_prop ;
	struct ZlangObject				*in1 = GetInputParameterInLocalObjectStack(rt,1) ;
	int						page_no ;

	CallRuntimeFunction_int_GetIntValue( rt , in1 , & page_no );

	gtk_notebook_remove_page( GTK_NOTEBOOK(guinotebooklayout_common->gtk_widget) , page_no-1 );

	return 0;
}

ZlangCreateDirectPropertyFunction ZlangCreateDirectProperty_guinotebooklayout;
void *ZlangCreateDirectProperty_guinotebooklayout( struct ZlangRuntime *rt , struct ZlangObject *obj )
{
	struct ZlangDirectProperty_guinotebooklayout	*guinotebooklayout_prop = NULL ;
	struct ZlangDirectProperty_guiwidget_common	*guinotebooklayout_common = NULL ;
	
	guinotebooklayout_prop = (struct ZlangDirectProperty_guinotebooklayout *)ZLMALLOC( sizeof(struct ZlangDirectProperty_guinotebooklayout) ) ;
	if( guinotebooklayout_prop == NULL )
	{
		SET_RUNTIME_ERROR( rt , RUNTIME_ERROR , ZLANG_ERROR_ALLOC , "alloc memory for entity" )
		return NULL;
	}
	memset( guinotebooklayout_prop , 0x00 , sizeof(struct ZlangDirectProperty_guinotebooklayout) );
	
	guinotebooklayout_common = (struct ZlangDirectProperty_guiwidget_common *)guinotebooklayout_prop ;
	guinotebooklayout_common->gtk_widget_type_id = GTK_TYPE_NOTEBOOK ;

	return guinotebooklayout_prop;
}

ZlangDestroyDirectPropertyFunction ZlangDestroyDirectProperty_guinotebooklayout;
void ZlangDestroyDirectProperty_guinotebooklayout( struct ZlangRuntime *rt , struct ZlangObject *obj )
{
	struct ZlangDirectProperty_guinotebooklayout	*guinotebooklayout_direct_prop = GetObjectDirectProperty(obj) ;
	
	ZLFREE( guinotebooklayout_direct_prop );
	
	return;
}

ZlangSummarizeDirectPropertySizeFunction ZlangSummarizeDirectPropertySize_guinotebooklayout;
void ZlangSummarizeDirectPropertySize_guinotebooklayout( struct ZlangRuntime *rt , struct ZlangObject *obj , size_t *summarized_obj_size , size_t *summarized_direct_prop_size )
{
	SUMMARIZE_SIZE( summarized_direct_prop_size , sizeof(struct ZlangDirectProperty_guinotebooklayout) )
	return;
}

static struct ZlangDirectFunctions direct_funcs_guinotebooklayout =
	{
		ZLANG_OBJECT_guinotebooklayout , /* char *ancestor_name */
		
		ZlangCreateDirectProperty_guinotebooklayout , /* ZlangCreateDirectPropertyFunction *create_entity_func */
		ZlangDestroyDirectProperty_guinotebooklayout , /* ZlangDestroyDirectPropertyFunction *destroy_entity_func */
		
		NULL , /* ZlangFromCharPtrFunction *from_char_ptr_func */
		NULL , /* ZlangToStringFunction *to_string_func */
		NULL , /* ZlangFromDataPtrFunction *from_data_ptr_func */
		NULL , /* ZlangGetDataPtrFunction *get_data_ptr_func */
		
		NULL , /* ZlangOperatorFunction *oper_PLUS_func */
		NULL , /* ZlangOperatorFunction *oper_MINUS_func */
		NULL , /* ZlangOperatorFunction *oper_MUL_func */
		NULL , /* ZlangOperatorFunction *oper_DIV_func */
		NULL , /* ZlangOperatorFunction *oper_MOD_func */
		
		NULL , /* ZlangUnaryOperatorFunction *unaryoper_NEGATIVE_func */
		NULL , /* ZlangUnaryOperatorFunction *unaryoper_NOT_func */
		NULL , /* ZlangUnaryOperatorFunction *unaryoper_BIT_REVERSE_func */
		NULL , /* ZlangUnaryOperatorFunction *unaryoper_PLUS_PLUS_func */
		NULL , /* ZlangUnaryOperatorFunction *unaryoper_MINUS_MINUS_func */
		
		NULL , /* ZlangCompareFunction *comp_EGUAL_func */
		NULL , /* ZlangCompareFunction *comp_NOTEGUAL_func */
		NULL , /* ZlangCompareFunction *comp_LT_func */
		NULL , /* ZlangCompareFunction *comp_LE_func */
		NULL , /* ZlangCompareFunction *comp_GT_func */
		NULL , /* ZlangCompareFunction *comp_GE_func */
		
		NULL , /* ZlangLogicFunction *logic_AND_func */
		NULL , /* ZlangLogicFunction *logic_OR_func */
		
		NULL , /* ZlangLogicFunction *bit_AND_func */
		NULL , /* ZlangLogicFunction *bit_XOR_func */
		NULL , /* ZlangLogicFunction *bit_OR_func */
		NULL , /* ZlangLogicFunction *bit_MOVELEFT_func */
		NULL , /* ZlangLogicFunction *bit_MOVERIGHT_func */
		
		ZlangSummarizeDirectPropertySize_guinotebooklayout , /* ZlangSummarizeDirectPropertySizeFunction *summarize_direct_prop_size_func */
	} ;

ZlangImportObjectFunction ZlangImportObject_guinotebooklayout;
struct ZlangObject *ZlangImportObject_guinotebooklayout( struct ZlangRuntime *rt )
{
	struct ZlangObject	*obj = NULL ;
	struct ZlangFunction	*func = NULL ;
	int			nret = 0 ;
	
	nret = ImportObject( rt , & obj , ZLANG_OBJECT_guinotebooklayout , & direct_funcs_guinotebooklayout , sizeof(struct ZlangDirectFunctions) , NULL ) ;
	if( nret )
	{
		SET_RUNTIME_ERROR( rt , RUNTIME_ERROR , ZLANG_ERROR_LINK_FUNC_TO_ENTITY , "import object to global objects heap" )
		return NULL;
	}
	
	func = AddFunctionAndParametersInObject( rt , obj , ZlangInvokeFunction_guinotebooklayout_Create_guiwindow , ZLANG_OBJECT_guinotebooklayout , "Create" , ZLANG_OBJECT_guiwindow,NULL , NULL ) ;
	if( func == NULL )
		return NULL;
	
	func = AddFunctionAndParametersInObject( rt , obj , ZlangInvokeFunction_guinotebooklayout_AppendPage_object_string , ZLANG_OBJECT_guinotebooklayout , "AppendPage" , ZLANG_OBJECT_object,NULL , ZLANG_OBJECT_string,NULL , NULL ) ;
	if( func == NULL )
		return NULL;
	
	func = AddFunctionAndParametersInObject( rt , obj , ZlangInvokeFunction_guinotebooklayout_SetCurrentPageByNo_int , ZLANG_OBJECT_guinotebooklayout , "SetCurrentPageByNo" , ZLANG_OBJECT_int,NULL , NULL ) ;
	if( func == NULL )
		return NULL;
	
	func = AddFunctionAndParametersInObject( rt , obj , ZlangInvokeFunction_guinotebooklayout_SetCurrentPageLabel_string , ZLANG_OBJECT_guinotebooklayout , "SetCurrentPageLabel" , ZLANG_OBJECT_string,NULL , NULL ) ;
	if( func == NULL )
		return NULL;
	
	ADD_FUNCTION_AND_PARAMETERS_IN_OBJECT_guiwidget_all_common_functions( notebooklayout )

	ADD_FUNCTION_AND_PARAMETERS_IN_OBJECT_guilayout_all_common_functions( notebooklayout )
	
	func = AddFunctionAndParametersInObject( rt , obj , ZlangInvokeFunction_guinotebooklayout_GetCurrentPageNo , ZLANG_OBJECT_int , "GetCurrentPageNo" , NULL ) ;
	if( func == NULL )
		return NULL;
	
	func = AddFunctionAndParametersInObject( rt , obj , ZlangInvokeFunction_guinotebooklayout_GetPageCount , ZLANG_OBJECT_int , "GetPageCount" , NULL ) ;
	if( func == NULL )
		return NULL;
	
	func = AddFunctionAndParametersInObject( rt , obj , ZlangInvokeFunction_guinotebooklayout_IsCurrentPageType_object , ZLANG_OBJECT_bool , "IsCurrentPageType" , ZLANG_OBJECT_object,NULL , NULL ) ;
	if( func == NULL )
		return NULL;
	
	func = AddFunctionAndParametersInObject( rt , obj , ZlangInvokeFunction_guinotebooklayout_GetCurrentPageWithType_object , ZLANG_OBJECT_object , "GetCurrentPageWithType" , ZLANG_OBJECT_object,NULL , NULL ) ;
	if( func == NULL )
		return NULL;
	
	func = AddFunctionAndParametersInObject( rt , obj , ZlangInvokeFunction_guinotebooklayout_GetPageByNo_int_object , ZLANG_OBJECT_object , "GetPageByNo" , ZLANG_OBJECT_int,NULL , ZLANG_OBJECT_object,NULL , NULL ) ;
	if( func == NULL )
		return NULL;
	
	func = AddFunctionAndParametersInObject( rt , obj , ZlangInvokeFunction_guinotebooklayout_RemovePage_int , ZLANG_OBJECT_void , "RemovePage" , ZLANG_OBJECT_int,NULL , NULL ) ;
	if( func == NULL )
		return NULL;
	
	return obj ;
}

